package com.kclm.service.impl;

import com.kclm.dao.UserDao;
import com.kclm.dao.impl.UserDaoImpl;
import com.kclm.pojo.User;
import com.kclm.service.UserService;

/**
 * @Author : lvhx
 * @Date: 2025/10/31 10:18
 * @Description:
 */
public class UserServiceImpl implements UserService {
    private UserDao  userDao = new UserDaoImpl();
    @Override
    public User findById(Integer id) {
        System.out.println("service 根据id查询----");
        User user = null;
        //  业务逻辑
        try{
           user = userDao.selectById(id);
        }catch (Exception  e){
            e.printStackTrace();
        }
        return user;
    }

    @Override
    public boolean save(User user) {
        System.out.println("service 插入用户----");
        //业务逻
        return false;
    }
}
